package com.lobo.blog.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: MacieSerenity
 * Date: 2020/04/19 17:22
 * Description:
 * Version: V1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Blog {
    public Blog(Blog blog) {
        this.id = blog.id;
        this.appreciation = blog.getAppreciation();
        this.commentable = blog.getCommentable();
        this.content = blog.getContent();
        this.createTime = blog.getCreateTime();
        this.description = blog.getDescription();
        this.firstPicture = blog.getFirstPicture();
        this.flag = blog.getFlag();
        this.published = blog.getPublished();
        this.recommend = blog.getRecommend();
        this.shareStatement = blog.getShareStatement();
        this.title = blog.getTitle();
        this.updateTime = blog.getUpdateTime();
        this.views = blog.getViews();
        this.isDeleted = blog.getIsDeleted();
        this.typeId = blog.getTypeId();
        this.type = blog.getType();
        this.tags = blog.getTags();
        this.tagsId = blog.getTagsId();
        this.tagsList = blog.getTagsList();
        this.user = blog.getUser();
        this.userId = blog.getUserId();
    }

    private Integer id;
    //    赞赏
    private Boolean appreciation;
    //    评论
    private Boolean commentable;
    //    内容
    private String content;
    //    创建时间
    private Date createTime;
    //    描述：首页简短展示文章内容
    private String description;
    //    首图
    private String firstPicture;
    //    转载类型
    private String flag;
    //    公开/发布
    private Boolean published;
    //    是否推荐
    private Boolean recommend;
    //    版权
    private Boolean shareStatement;
    //    标题
    private String title;
    //    更改时间
    private Date updateTime;
    //    浏览次数
    private Integer views;
    //是否被删除
    private Integer isDeleted;
    //TypeId
    private Integer typeId;

    private Type type;

    private List<Integer> tagsId;

    private String tags;

    private List<Tag> tagsList;

    private User user;

    private Integer userId;
}
